cabal-version:      2.2
name:               aria2h
version:            1.0.0.0
synopsis:           A TUI to talk to a remote aria2 instance.
homepage:           https://notabug.org/koz.ross/aria2h
license:            GPL-3.0-or-later
license-file:       LICENSE.md
author:             Koz Ross, Hécate
maintainer:         koz.ross@retro-freedom.nz
copyright:          (C) Koz Ross 2020, Hécate 2020
category:           Aria2
tested-with:        GHC ==8.10.1
build-type:         Simple
extra-source-files:
  CHANGELOG.md
  README.md

common common-lang
  ghc-options:
    -Wall -Wcompat -Wincomplete-record-updates
    -Wincomplete-uni-patterns -Wredundant-constraints -Werror

  default-language: Haskell2010

library aria2hlib
  import:          common-lang
  exposed-modules:
    Aria2.Bytes
    Aria2.Error
    Aria2.File
    Aria2.GID
    Aria2.Method
    Aria2.Notification
    Aria2.Options
    Aria2.Status
    Aria2.URI

  build-depends:
    , aeson                 ^>=1.5.0.0
    , base                  >=4.14      && <5
    , base64                ^>=0.4.2
    , bytestring            ^>=0.10.10.0
    , ip                    ^>=1.7.2
    , modern-uri            ^>=0.3.2.0
    , nonempty-vector       ^>=0.2.0.2
    , optics                ^>=0.3
    , scientific            ^>=0.3.6.2
    , static-text           ^>=0.2.0.6
    , text                  ^>=1.2.3.2
    , time                  ^>=1.9.3
    , unordered-containers  ^>=0.2.10.0
    , vector                ^>=0.12.1.2

  hs-source-dirs:  src

executable aria2h
  import:         common-lang
  main-is:        Main.hs
  build-depends:
    , aria2hlib
    , base
    , rhine       ^>=0.6.0
    , websockets  ^>=0.12.7.1

  hs-source-dirs: app

test-suite tests
  import:         common-lang
  type:           exitcode-stdio-1.0
  main-is:        Main.hs
  build-depends:
    , aria2hlib
    , base
    , hspec      >=2.7.1 && <3.0.0

  ghc-options:    -O2 -threaded -with-rtsopts=-N
  hs-source-dirs: test
